@use "element";
@use "media";

// 引入 tailwind CSS通用样式
@tailwind base;
@tailwind components;
@tailwind utilities;

// 字体内容
@font-face {
  font-family: "HarmonyOS_Sans_Medium";
  font-display: swap;
  src: url("assets/font/HarmonyOS_Sans_Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Pacifico";
  font-display: swap;
  src: url("assets/font/Pacifico.ttf") format("truetype");
}

@font-face {
  font-family: "UnidreamLED";
  font-display: swap;
  src: url("assets/font/UnidreamLED.ttf") format("truetype");
}

#__nuxt {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  * {
    user-select: none;
    font-family: HarmonyOS_Sans_Medium;
  }
}

.font-pacifico {
  font-family: Pacifico !important;
}

.font-led {
  font-family: UnidreamLED !important;
}

.bg-blur {
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  &.hide {
    transition: background-color 0.3s;
    background-color: transparent;
    backdrop-filter: blur(0px);
    &:hover {
      background-color: rgba(0, 0, 0, 0.25);
      backdrop-filter: blur(4px);
    }
  }
}

.bg-blur-hover {
  transition: all 0.5s;
  &:hover {
    transform: scale(1.02);
  }
  &:active {
    transform: scale(0.92);
  }
  &.dark:hover {
    background: rgb(0 0 0 / 40%);
  }
}

.bg-blur-sd {
  border-radius: 6px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
}

// 自定义鼠标
#cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 25px;
  opacity: 0.25;
  z-index: 10086;
  pointer-events: none;
  transition: 0.2s ease-in-out;
  transition-property: background, opacity, transform;

  &.hidden {
    opacity: 0;
  }

  &.active {
    opacity: 0.5;
    transform: scale(0.5);
  }
}

// Transition 动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease-in-out;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

@keyframes fade-blur-in {
  from {
    filter: blur(20px) brightness(0.3);
    transform: scale(1.6);
  }
  to {
    filter: blur(0) brightness(1);
    transform: scale(1.2);
  }
}

@keyframes fade-blur-main-in {
  from {
    transform: scale(1.2);
  }
  to {
    transform: scale(1);
  }
}
